home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- RETRIEVE(QUEL) 2/29/79 RETRIEVE(QUEL)
-
-
-
- NAME
- retrieve - retrieve tuples from a relation
-
- SYNOPSIS
- _r_e_t_r_i_e_v_e [[_i_n_t_o] relname] (target_list) [_w_h_e_r_e qual]
- _r_e_t_r_i_e_v_e _u_n_i_q_u_e (target_list) [_w_h_e_r_e qual]
-
- DESCRIPTION
- _R_e_t_r_i_e_v_e will get all tuples which satisfy the qualification
- and either display them on the terminal (standard output) or
- store them in a new relation.
-
- If a relname is specified, the result of the query will be
- stored in a new relation with the indicated name. A rela-
- tion with this name owned by the user must not already ex-
- ist. The current user will be the owner of the new rela-
- tion. The relation will have domain names as specified in
- the _t_a_r_g_e_t__l_i_s_t result_attnames. The new relation will be
- saved on the system for seven days unless explicitly saved
- by the user until a later date.
-
- If the keyword _u_n_i_q_u_e is present, tuples will be sorted on
- the first domain, and duplicates will be removed, before be-
- ing displayed.
-
- The keyword _a_l_l can be used when it is desired to retrieve
- all domains.
-
- If no result _r_e_l_n_a_m_e is specified then the result of the
- query will be displayed on the terminal and will not be
- saved. Duplicate tuples are not removed when the result is
- displayed on the terminal.
-
- The format in which domains are printed can be defined at
- the time ingres is invoked (see ingres(unix)).
-
- If a result relation is specified then the default procedure
- is to modify the result relation to an cheapsort storage
- structure removing duplicate tuples in the process.
-
- If the default cheapsort structure is not desired, the user
- can override this at the time INGRES is invoked by using the
- -_r switch (see ingres(unix)).
-
- Only the relation's owner and users with retrieve permission
- may _r_e_t_r_i_e_v_e from it.
-
- EXAMPLE
- /* Find all employees who make more than their manager */
- range of e is emp
- range of m is emp
- retrieve (e.name) where e.mgr = m.name
- and e.sal > m.sal
- /* Retrieve all domains for those who make more
- than the average salary */
- retrieve into temp (e.all) where e.sal > avg(e.sal)
- /* retrieve employees's names sorted */
- retrieve unique (e.name)
-
- SEE ALSO
- modify(quel), permit(quel), quel(quel), range(quel),
- save(quel), ingres(unix)
-
- DIAGNOSTICS
-
- BUGS
-
-